package com.example.lotterysystem.mapper;

import com.example.lotterysystem.pojo.dataobject.ActivityPrizeDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ActivityPrizeMapper {

    int batchInsert(@Param("items") List<ActivityPrizeDO> activityPrizeDOList);

    List<ActivityPrizeDO> selectByActivityId(@Param("activityId") Long activityId);

    ActivityPrizeDO selectByAPId(@Param("activityId") Long activityId,
                                 @Param("prizeId") Long prizeId);

    int countPrize(@Param("activityId") Long activityId,
                   @Param("status") String status);

    void updateStatus(@Param("activityId") Long activityId,
                      @Param("prizeId") Long prizeId,
                      @Param("status") String status);
}
